using Microsoft.AspNetCore.Identity;
using Services.Identity.Domain.Entities;
using Services.Identity.Domain.ValueObject;

namespace Services.Identity.Domain;
public interface IIdentityRepository
{
    Task<IdentityResult> AddRoleAsync(string roleName);
    Task<IdentityResult> AddUserAsync(string userName, string userPhone, string password);
    Task<IdentityResult> AddUserToRoleAsync(string userId, string roleId);
    Task<(IdentityResult result, User user)> CheckUserNameAndPasswordAsync(string userName, string password);
    Task<(IdentityResult result, User user)> CheckUserPhoneAndPasswordAsync(string userPhone, string password);
    Task<IdentityResult> DeleteRoleAsync(string roleName);
    Task<IdentityResult> DeleteUserAsync(string userName);
    Task<bool> DeleteRolePermissionsAsync(Role role, string[] permissions);
    Task<string[]> GetAllRoleNamesAsync();
    Task<string[]> GetRolesByUserAsync(User user);
    Task<User> GetUserInformationByIdAsync(string id);
    Task<List<User>> GetUserInformationByNamesync(string name);
    Task<Role> GetRoleAsync(string roleName);
    Task<List<PermissionNameAndRouter>> GetRolePermissionsAsync(Role role);
    Task<bool> AddRolePermissionsAsync(Role role, List<PermissionNameAndRouter> permissionNameAndRouters);
}